package com.service;

import java.sql.SQLException;
import java.util.ArrayList;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.dao.UserDAO;
import com.vo.UserVO;

/**
 * @author daou-ljhjoin
 *
 */
@Service("userService")
public class UserService {
	@Resource(name="userDAO")
	private UserDAO dao;
	
	public UserVO selectUserById(String id) throws SQLException {
		return dao.selectUserById(id);
	}

	public void registerUser(UserVO userVo) throws SQLException {
		dao.registerUser(userVo);
	}

	public UserVO updateUser(UserVO userVo) throws SQLException {
		return dao.updateUser(userVo);
	}

	public void removeUser(String id) throws SQLException {
		dao.deleteUser(id);
	}
	
	public ArrayList<UserVO> selectUserList() throws SQLException{
		return dao.selectUserList();
	}
	
}
